# Please install OpenAI SDK first: `pip3 install openai`
#deepseek api接口功能开发，需主要，需要充值才会有tokens，否则接口会报错402，账户余额不足
from openai import OpenAI

client = OpenAI(api_key="sk-04c465ff193240629fc462e0a72abc88", base_url="https://api.deepseek.com")

response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "Hello"},
    ],
    stream=False
)

print(response.choices[0].message.content)